enum OrderType;

ref class TWS
{
public:
	void NewOrder(Trigger ^trg, OrderType ordT);
	void UpdateOrder(Trigger ^trg, OrderType ordT);
	int GetNewOrderID();
	int GetNewID();
	void CancelOrder(int ord_num);
	TWSLib::IContract^ TWS::CreateContract();

	TWS(AxTWSLib::AxTws ^tws_pointer); // Constructor

	AxTWSLib::AxTws ^tws;

protected:
	int cur_order_id;
	int cur_id;
	void UpdateID(System::Object^  sender, AxTWSLib::_DTwsEvents_nextValidIdEvent^  e);
	
};

enum OrderType{ oTrigger, oLimit_1, oLimit_2, oLimit_3, oLimit_4, oStop, oStopMKT };
